home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
kgclock.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1992-08-13
|
5KB
|
153 lines
CLOCK FOR CLIPPER 5 APPLICATIONS
Gallagher Computing Corp.
Written by Ben Echols
with MS-MASM 6.0
■ This function will continuously display the time at desired position.
■ Works with Clipper 5.0 only, it will not work with Clipper Summer 87.
■ See below for error checking and valid -> ROW/COLUMN placements.
■ Colors used are the colors at the desired position of the clock.
If the colors were the clock will be positioned are white on blue then
the clock will be white on blue..
■ Warning! The clock works with the interrupt system, and for this
reason MUST be uninstalled prior to leaving the Clipper program.
Otherwise the interrupt vectors will not be restored, and the system
will CRASH -- BIG TIME..
■ The demo shows three methods of installing/uninstalling the clock.
Select one of them and use the Clipper "define" directive...
■ Also note that if you do not own GRUMP.LIB, you will need to alter
the demo (remove grump functions).
■ Tip: Use SETCANCEL() to prohibit users from breaking out of the
program that is using the clock, so the system does not crash.
■ And of course its time to plead for $$'s
If you like this clock function, please send a poor programmer $5.00
dollars (if you are poor too then by all means keep it for free)..
Send $15.00 for source code -- .ASM
■ How to compile/link (Clock functions)
Clipper test /m/n/a/w
Rtlink FILE test, ticker LIB grump
■ GRUMPFISH FUNCTIONS:
~~~~~~~~~~~~~~~~~~~~
GFSAVEENV() - Saves screen/cursor/color
EXBOX() - Exploding box with shadow
WAITON() - Message box
BYEBYEBOX() - Restore screen used by EXBOX()
WAITOFF() - Restores screen used by WAITON()
GFRESTENV() - Restores from GFSAVEENV()
■ Coming attractions:
BK_NUMDRV() --> nFloppies
This function also written in assembly code for Clipper will return
0 - If no floppy drives are installed
1 - If there the system has only one floppy drive installed
2 - If there the system has only one floppy drive installed
In other words it returns the number of installed diskette drives.
So by calling this function with a system with one (1) floppy drive,
you can eliminate the DOS message "insert diskette into drive b:"
BK_NUMDRV() is betaing at present time.
BK_SQUISH()
Used to remove unwanted characters from a string. There are functions
that do this now, but this one will do multiple removals in one pass,
were others need say six passes, this one will need one pass..
BK_SQUISH() is alpha testing at present time
The next release of this clock will have the ability to remove itself
upon exiting a program (auto uninstall).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BK_TICKINS(<nRow>, <nCol>)
BK_TICKREM()
ARGUMENTS:
<nRow> 0 - 24 is the row where the clock will be placed.
<nLeft> 0 - 72 is the column where the clock will be placed.
RETURNS:
- 100 successful
- 99 col out of range \ BK_TICKINS ...
- 98 row out of range \ ... only
- 97 already installed / not installed
EXAMPLES:
BK_TICKINS(24,60) // Install clock.
BK_TICKREM() // Remove clock.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SEND COMMENTS/REGISTERATION
===========================
Gallagher Computing Corp.
660 Woodward Drive
Huntingdon Valley Penna. 19006
Compuserve CIS: 70034,2313
Send Money Orders or personal bankcheck (no cash)
Your name____________________________________________
Street____________________________________________
City____________________________________________
State____________________ZipCode_________________
Comments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SIMPLE DEMO:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function main
local nErr
@0,0 say padr(" Press any key to exit program",80) color "n/w"
CLOCK( 0, 72 ) // Install clock
inkey(0) // allow clock to run until keypress
nErr:=CLOCK() // Remove clock
@3,0 say "Return code from clock is "+STR(nErr,3) color "w+/n"
return nil
function CLOCK(nRow,nCol)
local x:=IF(nRow==NIL.OR.nCol==NIL,BK_TICKREM(),BK_TICKINS(nRow, nCol))
return x
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~